# -*- coding: utf-8 -*-
from common.config import *
from db.mysql import MysqlClient
from common.helper import Helper
class Arrangement( object ):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "尊享e生2019版"
    # 拉取数据
    def pullData(self,data={}):
        for item in Helper.selectData( self.name,self.mysql):
            data["name"] = self.name
            data["company"] = "众安保险"
            data["year"] = item["year"]
            data["socialSec"] = item["socialSec"]
            data["radiationMedical"] = "0" if item["radiationMedical"] == "0" else str(int(int( item["radiationMedical"])/10000) ) + "w"
            data["cancerMedical"] = "0" if item["cancerMedical"] == "0" else str(int(int( item["cancerMedical"])/10000)) + "w"
            data["specialMedical"] = "0" if item["specialMedical"] == "0" else str( int(int( item["specialMedical"])/10000)) + "w"
            data["price"] = item["price"]
            Helper.mergeTable(self.name,self.mysql,data )
